#ifndef ATTR_NODE_H
#define ATTR_NODE_H


#include "namespace.h"
#include "attribute.h"
#include "node.h"

#include <string>
#include <list>
#include <iostream>

class AttrNode : public Node {

public:
	
	AttrNode();
	AttrNode(const AttrNode& e);
	AttrNode(std::string tag);
	AttrNode(std::string tag, std::string ns);
	
	virtual ~AttrNode();
	
	void setAttributes(std::list<XmlAttribute*> *attrs );
	void setTag(std::string& tag);
	void setNamespace(Namespace ns);
	
	std::list<XmlAttribute*>* getAttributes();
	std::string getAttributeValue(std::string name);
	std::string getTag();
	std::string getNSTag();
	Namespace getNamespace();
	virtual AttrNode* clone() const = 0;

protected:

	void printAttributes(std::ostream& out);

	std::list<XmlAttribute*> *mAttributes;
	std::string mTag;
	Namespace mNamespace;

};

#endif // ATTR_NODE
